
    <style>
        #paypwd .bg {
            background: rgba(0, 0, 0, 0.5);
            position: fixed;
            width: 100vw;
            max-width: 750px;
            min-width: 320px;;
            height: 100vh;
            top: 0;
            /* left: 0; */
        }


        #paypwd .wrap {
            position: fixed;
            bottom: 0;
            width: 100vw;
            
            max-width: 750px;
            min-width: 320px;;
            text-align: center;
            background: #fff;
            z-index: 999;
        }

        #paypwd h3 {
            /* border-bottom: 1px solid rgba(71, 22, 183, 1); */
            margin: 10px 10%;
            padding: 7px 0;
            font-size: 22px;
        }

        #paypwd .money {
            font-size: 22px;
            margin-bottom: 30px;
        }

        #paypwd .pwd {
            display: flex;
            border: 1px solid #ddd;
            width: 80%;
            margin: 0 10%;
            margin-bottom: 30px;
            background: #fff;
        }

        #paypwd .pwd .w-list {
            border-right: 1px solid #eee;
            width: calc((80vw - 5px) / 6);
            height: calc((80vw - 5px) / 6);
            display: flex;
            justify-content: center;
            align-items: center;
        }

        #paypwd .pwd .w-list .yuan {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #fff;
            display: inline-block;
        }

        #paypwd .pwd .w-list.num .yuan {
            background: #000;
        }

        #paypwd .pwd .w-list:last-child {
            border-right: none;
        }

        #paypwd .keyboard {
            display: flex;
            flex-wrap: wrap;
            background: #fff;
        }

        #paypwd .keyboard .k-list {
            border-right: 1px solid #eee;
            border-top: 1px solid #eee;
            width: calc((100% - 2px) / 3);
            text-align: center;
            line-height: 50px;
            font-size: 22px;
        }

        #paypwd .keyboard .k-list:nth-child(3n) {
            border-right: none;
        }

        #paypwd .keyboard .del {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #paypwd .keyboard .del img {
            width: 30px;
        }
    </style>

    <div id="paypwd">
        <div class="bg" onclick="closeMoneyFrm()"></div>
        <div class="wrap">
            <h3>请设置提现密码</h3>
            <!-- <div class="money">￥ <span>0</span></div> -->
            <ul class="pwd">
                <li class="w-list"><span class="yuan"></span></li>
                <li class="w-list"><span class="yuan"></span></li>
                <li class="w-list"><span class="yuan"></span></li>
                <li class="w-list"><span class="yuan"></span></li>
                <li class="w-list"><span class="yuan"></span></li>
                <li class="w-list"><span class="yuan"></span></li>
            </ul>
            <ul class="keyboard">
                <li class="k-list" onclick="getnum(1)" data-key=1>1</li>
                <li class="k-list" onclick="getnum(2)" data-key=2>2</li>
                <li class="k-list" onclick="getnum(3)" data-key=3>3</li>
                <li class="k-list" onclick="getnum(4)" data-key=4>4</li>
                <li class="k-list" onclick="getnum(5)" data-key=5>5</li>
                <li class="k-list" onclick="getnum(6)" data-key=6>6</li>
                <li class="k-list" onclick="getnum(7)" data-key=7>7</li>
                <li class="k-list" onclick="getnum(8)" data-key=8>8</li>
                <li class="k-list" onclick="getnum(9)" data-key=9>9</li>
                <li class="k-list" onclick="getnum(10)" data-key='10'></li>
                <li class="k-list" onclick="getnum(0)" data-key=0>0</li>
                <li class="k-list del" onclick="del()"><img src="../image/del.png" alt=""></li>
            </ul>
        </div>
    </div>
<script>
    var payPwd = [];
    // 删除
    function del() {
        if (payPwd.length == 0) {
            return;
        }
        $('.w-list').eq(payPwd.length - 1).removeClass('num');
        payPwd.pop();
    }
    var fristPwd;
    // 点击数字
    function getnum(num) {
        if (num == 10) {
            return;
        }
        payPwd.push(num);
        $('.w-list').eq(payPwd.length - 1).addClass('num');

        if (payPwd.length == 6) {
            var w = payPwd.join('');
            _log(w);
            // 第一次输入
            if (!fristPwd) {
                fristPwd = w;
                $('h3').text('请再次设置提现密码');
                payPwd = [];
                $('.w-list').removeClass('num');
                return;
            }
            // 第二次输入
            if (fristPwd != w) {
                _msg('两次密码不一致');
                return;
            }
            // 两次密码一致
            _ajax('c=Withdraw&a=setPwd', function (ret) {
                _log(JSON.stringify(ret))
                if (ret && ret.code == 200) {
                    getMyMoney();
                    _msg('设置成功')
                    setTimeout(function () {
                        closeMoneyFrm()
                    }, 800)
                    location.reload();
                } else {
                    _msg('设置失败')
                }
            }, {
                userid: myuserid,
                password: w,
                phone: view.ffInfo.phone,
                urlType: 'get'
            })
        }
    }
</script>